const h1 = document.querySelector('h1');
const fang = document.querySelector('.fangSir');

// 重复点击可以隐藏
let judge = true
const showName = e => {
    if (judge == true) {
        h1.innerHTML = '方 海 涛';
        h1.style.display = 'block'
        judge = false
        fang.style.color = 'hotpink';
        fang.innerHTML = '点击我隐藏'
    } else {
        h1.style.display = 'none'
        judge = true
        fang.style.color = '#000';
        fang.innerHTML = '猜猜我是谁'
    }
}

fang.addEventListener('click', showName)

const btn = document.querySelector('#btn');
btn.addEventListener("click", () => {
    alert('欢迎光临，肖碧洋~');
    btn.style.color = '#fff';

});
const btn1 = document.getElementById("userName");
btn1.addEventListener('click', () => {
    alert("你好王书平，我是小熊;");
})
// 淑梁
const btn2 = document.querySelector(".wu");
btn2.addEventListener('click', () => {
    alert("你好,吴淑梁");
    btn2.style.color = '#fff';
})

const Button = document.querySelector('#button');
const big = document.querySelector('.big')
const h2 = document.querySelector('h2');

Button.addEventListener('click', function () {
    h2.innerHTML = '冯宝红';
    big.style.display = 'block';
})
